
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>nodejs</title>
    <meta name="description" content="test">
    <script src="./cdn/jquery-3.7.1.min.js"></script>
  </head>
  <body>
    <div id="counter">
      <button id="test1">项目打包</button>
      <button id="test2">文件同步</button>
    </div>
    <script>
      $("#test1").click(function(){
        $.ajax({
          url: 'http://192.168.31.175:3001/build',
          type: 'POST',
          timeout: 1000*60*5,
          data:JSON.stringify({
            "type":"h5"
          }),
          'headers': {
            'Content-Type': 'application/json;charset=UTF-8',
          },
          success: function(data){
            console.log(data)
          },
        });
      });
      $("#test2").click(function(){
        $.ajax({
          url: 'http://192.168.31.175:3001/fileSync',
          type: 'POST',
          timeout: 1000*60,
          data:JSON.stringify({
            "past":"/Users/yinkaiyan/Desktop/my/uniapp/dist/build/h5",
            "new":"/Users/yinkaiyan/Desktop/download/"
          }),
          'headers': {
            'Content-Type': 'application/json;charset=UTF-8',
          },
          success: function(data){
            console.log(data)
          },
        });
      });
    </script>
  </body>
</html>